import request from '../utils/request';

// -------------------------------------------------------------employess
export const fetchDatamessage = query => {
    return request({
        url: '/WORKSPACE/apis/employess',
        method: 'get',
        params: query
    });
};

export const postDatamessage = query => {
    return request({
        url: '/WORKSPACE/apis/employess',
        method: 'post',
        data: query
    });
};

export const putDatamessage = query => {
    console.log(query)
    return request({
        url: '/WORKSPACE/apis/employess',
        method: 'put',
        data: query
    });
};
export const deleteDatamessage = query => {
    console.log(query)
    return request({
        url: '/WORKSPACE/apis/employess',
        method: 'delete',
        params: query
    });
};
// -------------------------------------------------------------department
export const fetchDatadepartment = query => {
    return request({
        url: '/WORKSPACE/apis/department',
        method: 'get',
        params: query
    });
};

export const postDatadepartment = query => {
    return request({
        url: '/WORKSPACE/apis/department',
        method: 'post',
        data: query
    });
};

export const putDatadepartment = query => {
    console.log(query)
    return request({
        url: '/WORKSPACE/apis/department',
        method: 'put',
        data: query
    });
};
export const deleteDatadepartment = query => {
    console.log(query)
    return request({
        url: '/WORKSPACE/apis/department',
        method: 'delete',
        params: query
    });
};
//--------------------------------------------money
export const fetchDatamoney = query => {
    return request({
        url: '/WORKSPACE/apis/wdata',
        method: 'get',
        params: query
    });
};

export const postDatamoney = query => {
    return request({
        url: '/WORKSPACE/apis/wdata',
        method: 'post',
        data: query
    });
};

export const putDatamoney = query => {
    console.log(query)
    return request({
        url: '/WORKSPACE/apis/wdata',
        method: 'put',
        data: query
    });
};
export const deleteDatamoney = query => {
    console.log(query)
    return request({
        url: '/WORKSPACE/apis/wdata',
        method: 'delete',
        params: query
    });
};
//---------------------------------------------------------employesswage
export const fetchDataemployesswage = query => {
    return request({
        url: '/WORKSPACE/apis/employesswage',
        method: 'get',
        params: query
    });
};
//---------------------------------------------departmentwage
export const fetchDatadepartmentwage = query => {
    return request({
        url: '/WORKSPACE/apis/departmentwage',
        method: 'get',
        params: query
    });
};
//---------------------------------------allwage
export const fetchDataallwage = query => {
    return request({
        url: '/WORKSPACE/apis/allwage',
        method: 'get',
        params: query
    });
};
//-----------------------------------attendance
export const fetchDataattendance = query => {
    return request({
        url: '/WORKSPACE/apis/attendance',
        method: 'get',
        params: query
    });
};

export const postDataattendance = query => {
    return request({
        url: '/WORKSPACE/apis/attendance',
        method: 'post',
        data: query
    });
};

export const putDataattendance = query => {
    console.log(query)
    return request({
        url: '/WORKSPACE/apis/attendance',
        method: 'put',
        data: query
    });
};
export const deleteDataattendance = query => {
    console.log(query)
    return request({
        url: '/WORKSPACE/apis/attendance',
        method: 'delete',
        params: query
    });
};
//=------------------------------------overtime
export const fetchDataovertime = query => {
    return request({
        url: '/WORKSPACE/apis/overtime',
        method: 'get',
        params: query
    });
};

export const postDataovertime = query => {
    return request({
        url: '/WORKSPACE/apis/overtime',
        method: 'post',
        data: query
    });
};

export const putDataovertime = query => {
    console.log(query)
    return request({
        url: '/WORKSPACE/apis/overtime',
        method: 'put',
        data: query
    });
};
export const deleteDataovertime = query => {
    console.log(query)
    return request({
        url: '/WORKSPACE/apis/overtime',
        method: 'delete',
        params: query
    });
};